module CrudHelper
  def index
    @entity = get_records_sorted_and_paginated(params[:column_sorts],params[:page],5,params[:order])
    @header_info = get_header_info()

    respond_to do |format|
      format.js
      format.html
      format.json { render :json => @entity }
    end
  end

  def new
    @entity = create_entity()

    respond_to do |format|
      format.html
      format.json { render :json => @user }
    end
  end
end